package com.legendshop.oa.dao;

import java.util.List;

import com.legendshop.oa.constants.ApplicationEnum;
import com.legendshop.oa.model.UserRole;
import com.legendshop.oa.model.UserRoleId;

public interface UserRoleDao {

	List<UserRole> getUserRoleByUserId(Long userId);
	
	List<UserRole> getUserRoleByRoleId(Long roleId);
	
	UserRole getUserRoleById(UserRoleId id);
	
	int deleteUserRoleById(UserRoleId id);
	
	int deleteUserRole(List<UserRole> userRoleList);
	
	int saveUserRole(UserRole userRole);

    int deleteUserRole(UserRole userRole);

	void saveUserRoleList(List<UserRole> userRoles);
	
	/**
	 * 删除用户对应的角色
	 * @param id
	 * @param backEnd
	 */
	void deleteUserRoleByUserId(Long userId, ApplicationEnum backEnd);
	
}
